package com.xiaomaoguai.observer.example.jdk;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Observable;
import java.util.Observer;

public class SubMan implements Observer {

    private static final Logger Log = LoggerFactory.getLogger(SubMan.class);

    private String name;

    public SubMan(String name) {
        this.name = name;
    }

    @Override
    public void update(Observable o, Object arg) {
        String content = (String) arg;
        Log.info("Observer-JDK", name + " received news content : " + content);
    }
}





